#pragma once

#include <string>

enum class LogType { 
    Concole,
    File
};

void LogWrite(const std::string level, const std::string log, const std::string file, const int line);
void LogInit(LogType logtype_ = LogType::Concole, std::string format_ = "{time} {level} {content} {file}:{line}", std::string para = "log.txt");

#define LOGDEBUG(s) LogWrite("debug", s, __FILE__, __LINE__)
#define LOGINFO(s) LogWrite("info", s, __FILE__, __LINE__)
#define LOGERROR(s) LogWrite("error", s, __FILE__, __LINE__)
#define LOGFATAL(s) LogWrite("fatal", s, __FILE__, __LINE__)
